package com.lovi.io_.decorator_;

public class BufRe extends Reader_{
    private Reader_ reader_;

    public BufRe(Reader_ reader_) {
        this.reader_ = reader_;
    }

    @Override
    void read() {
        reader_.read();
    }
    /**
     * 写一些包装类
     */
    void reRead(int num){
        System.out.println("重复读取");
        for (int i = 0; i < num; i++) {
            reader_.read();
        }
    }
}
